﻿using System;

namespace IE_Functions
{
    internal class LanguageStrings
    {
        Language lang = Language.Unkown; // Initialwert

        // Konstruktoren
        public LanguageStrings(Language lang)
        {
            if (lang != Language.Unkown)
            {
                this.lang = lang;
            }
            else
            {
                throw new ArgumentException("Der Parameter lang darf nicht den Wert Language.Unkown haben", "lang");
            }
        }

        public LanguageStrings(string lang)
        {
            if (lang.ToLower() == "de")
            {
                this.lang = Language.DE;
            }
            else
            {
                this.lang = Language.Other;
            }
        }

        // Eigenschaften
        public string Done
        {
            get
            {
                if (this.lang == Language.DE)
                {
                    return "Fertig!";
                }
                return "Done!";
            }
        }

        public string Error
        {
            get
            {
                if (this.lang == Language.DE)
                {
                    return "Fehler";
                }
                return "Error";
            }
        }

        public string IEIsRunning
        {
            get
            {
                if (this.lang == Language.DE)
                {
                    return "Der Internet Explorer läuft noch. Bitte beende ihn.";
                }
                return "Internet Explorer is still running. Please close it.";
            }
        }

        public string Information
        {
            get
            {
                return "Information";
            }
        }

        public string Warning
        {
            get
            {
                if (this.lang == Language.DE)
                {
                    return "Warnung";
                }
                return "Warning";
            }
        }
    }

    public enum Language
    {
        Unkown = -1,
        DE,
        Other
    }
}
